function deleteType(obj){
    var form=document.getElementById("form");
    document.getElementById("type").value=obj.id;
    form.action="/admin/deletetype"
    form.submit();
}
function addType(){
    var form=document.getElementById("form");
    form.action="/admin/inserttype";
    form.submit();
}